//
//  libControlScrollView.h
//  lib
//
//  Created by yappa on 10/04/21.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ViewBase.h"


#define CS_AUTO_MOVE_TIME_FAST		(5.00)
#define CS_AUTO_MOVE_TIME_NORMAL	(CS_AUTO_MOVE_TIME_FAST * 2)
#define CS_AUTO_MOVE_TIME_SLOW		(CS_AUTO_MOVE_TIME_NORMAL * 2)
#define CS_AUTO_VIEW_NUM			(3)		// オート移動用最低登録枚数

@interface libScrollView : UIScrollView{
}
@end

@interface libControlScrollView : ViewBase <UIScrollViewDelegate> {
	libScrollView*			m_ScrollView;
	UIPageControl*			m_PageControl;
	u_int					m_numberOfPages;
	CGFloat					m_width;
	CGFloat					m_rotate_ratio;
	
	NSArray*				m_AutoViewList;
	u_int					m_auto_page_no;
	CFAbsoluteTime			m_auto_move_time;
	IBOutlet UIButton*		m_btnMoveLeft;
	IBOutlet UIButton*		m_btnMoveRight;
}
@property(nonatomic, readonly) NSArray*	m_AutoViewList;
@property(nonatomic, retain) IBOutlet UIButton*	m_btnMoveLeft;
@property(nonatomic, retain) IBOutlet UIButton*	m_btnMoveRight;

- (id)initWithFrame:(CGRect)frame width:(CGFloat)width;
- (void)update:(double)time;
- (void)setAutoresizingMaskAll:(UIViewAutoresizing)autoresizingMask;
- (void)setPageControlHidden:(BOOL)hidden;
- (void)addView:(ViewBase*)view;				
- (BOOL)removeView:(ViewBase*)view;				
- (BOOL)removeViewWithNo:(u_int)page;
- (void)removeAllView;
- (void)setAutoViewList:(NSArray*)list;			
- (void)setAutoViewList:(NSArray*)list num:(u_int)num;

- (u_int)getCurrentPage;						
- (BOOL)setCurrentPage:(u_int)pege_no;			
- (void)toPrevPage;								
- (void)toNextPage;								
- (void)setPageControlPos:(int)offsetY;			
- (void)disableDrag;							
- (void)disablePageControllInteraction;			
- (void)removePageControl;						
- (void) setContenSize: (CGSize) size;

- (void) setAutoScroll: (BOOL) isAutoScroll;
- (int) getMaxNumber;

@end
